import request from '@/utils/request'

// 查询api管理列表 
export function dockList(query) {
  return request({
    url: '/dock/list',
    method: 'get',
    params: query
  })
}
// 删除api数据 
export function dockDeleteMonitor(query) {
  return request({
    url: '/dock/deleteMonitor',
    method: 'get',
    params: query
  })
}
// 获取系统名称 
export function getGroups(query) {
  return request({
    url: '/dockManage/getGroups',
    method: 'get',
    params: query
  })
}
// 添加系统名称 
export function addGroup(query) {
  return request({
    url: '/dockManage/addGroup',
    method: 'post',
    params: query
  })
}
// 新增编辑任务弹窗回显 
export function editSequenceMonitor(query) {
  return request({
    url: '/dockManage/editSequenceMonitor',
    method: 'post',
    params: query
  })
}
// 新增、修改任务 
export function saveSequenceMonitor(query) {
  return request({
    url: '/dockManage/saveSequenceMonitor',
    method: 'post',
    data: query
  })
}
// 获取数据源数据 
export function datasourceList(query) {
  return request({
    url: '/datasource/list',
    method: 'get',
    params: query
  })
}
// 获取字段映射关系 
export function datasourceFields(query) {
  return request({
    url: '/datasource/getTableFields',
    method: 'get',
    params: query
  })
}

// 接口测试 
export function testApi(query) {
  return request({
    url: '/dockManage/testApi',
    method: 'post',
    data: query
  })
}
// 执行一次 
export function excuteApi(query) {
  return request({
    url: '/dockManage/excuteApi',
    method: 'get',
    params: query
  })
}
// 启动、停止任务 
export function enableMonitor(query) {
  return request({
    url: '/dock/enableMonitor',
    method: 'get',
    params: query
  })
}
// 获取接口调用日志 
export function apiLog(query) {
  return request({
    url: '/dock/apiLog',
    method: 'get',
    params: query
  })
}
// 获取执行日志 
export function excuteLog(query) {
  return request({
    url: '/dock/excuteLog',
    method: 'get',
    params: query
  })
}